<?php
namespace Core\Forms\Element;

use Phalcon\Tag;
use Phalcon\Forms\Exception;
use Core\Forms\Element;

class Url extends Element
{
    public function render($attributes = null)
    {
        if (is_array($attributes) === false &&
            is_null($attributes) === false) {
            throw new Exception('Invalid parameter type.');
        }
        $attributes['type'] = 'url';

        return Tag::textField($this->prepareAttributes($attributes));
    }
}
